home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 6714 < prev    next >
Encoding:
Text File  |  1996-08-05  |  2.4 KB  |  46 lines

  1. Newsgroups: comp.lang.c++,comp.lang.c,comp.lang.misc
  2. Path: in1.uu.net!allegra!alice!kpv
  3. From: kpv@research.att.com (Phong Vo)
  4. Subject: Re: allocator studies (was Re: GC & traditional allocators & textbooks)
  5. Message-ID: <DMGoK9.M0u@research.att.com>
  6. Organization: AT&T Research, Murray Hill, NJ
  7. References: <823455623snz@wildcard.demon.co.uk> <4f59c3$7il@jive.cs.utexas.edu> <3117E708.41C67EA6@research.att.com>
  8. Date: Thu, 8 Feb 1996 14:36:08 GMT
  9.  
  10. In article <3117E708.41C67EA6@research.att.com> Phong Vo <kpv@research.att.com> writes:
  11. >> 
  12. >Just a quick note that I am now with the new AT&T Research.
  13. >The main topics of the paper that Paul mentioned are a new API for memory allocation
  14. >called Vmalloc and a performance study comparing it against a number of
  15. >well-known malloc implementations. The code is currently available for non-commercial
  16. >use for anyone interested at the below url:
  17. >    http://www.research.att.com/orgs/ssr/reuse/
  18.  
  19. A few people alerted me that the above address is wrong.
  20. The right one is:
  21.     http://www.research.att.com/orgs/ssr/book/reuse/
  22.  
  23. There were also questions about how Vmalloc is different from malloc.
  24. Briefly, it introduces the notion of allocating through "regions".
  25. Each region is parameterized by a "discipline" that defines how to obtain
  26. raw memory for the region and a "method" to define the allocation policy.
  27. In this way, by writing your own disciplines, you could allocate any type
  28. of memory (e.g., shared, mmap, stack) or just to reorganize memory in some
  29. region (e.g., making sure that all allocations for a complex structure
  30. are collected in a small number of pages from the heap). The package
  31. provides two standard disciplines, one for heap allocation (sbrk on Unix)
  32. and the other for allocating from the heap. The current set of methods
  33. including general purpose allocation via a modified best-fit method,
  34. allocation mostly without free, allocation of same-size objects,
  35. allocation with debugging and allocation with profiling.
  36.  
  37. For backward compatibility, Vmalloc also provides a malloc interface.
  38. This interface lets you set allocation methods via environment variables
  39. at program start-up time. So your programs can run at normal speed in
  40. normal cases yet have the ability to do debugging or profiling when necessary.
  41. This means production code can still debug memory problems,
  42. a different approach from Purify or other debugging mallocs
  43. which are only useful in the development phase.
  44.  
  45. Phong Vo, kpv@research.att.com
  46.